{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "from datasets import load_dataset\n",
    "\n",
    "ds = load_dataset(\"AxT-dev/deepscaler_7b_train_data\", split=\"train\")\n",
    "\n",
    "dataset = []\n",
    "for entry in ds:\n",
    "    problem = entry[\"prompt\"]\n",
    "    assert isinstance(problem, list)\n",
    "    new_entry = {\n",
    "        \"problem\": problem[0][\"content\"],\n",
    "        \"answer\": entry[\"ground_truth\"],\n",
    "    }\n",
    "    dataset.append(new_entry)\n",
    "\n",
    "with open(\"../../train/math/deepscaler_7b.json\", \"w\") as f:\n",
    "    json.dump(dataset, f, indent=4)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "rllm",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
